<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="../include/tag.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>合伙人众筹数据</title>
    <link rel="stylesheet" href="${ctx}/css/common/list.css">
    <link rel="stylesheet" href="${ctx}/css/common/table.css">
    <%@include file="../include/commonFile.jsp" %>
    <style>
        .list-content {
            padding-top: 20px;
            margin-bottom: 20px;
        }

        .list-content .num div{
            width: 50%;
            display: inline-block;
        }

        .list-content .num li {
            padding-right: 30px;
            padding-bottom: 10px;
            position: relative;
            display: inline-block;
            height: 30px;
            line-height: 30px;
        }

        .list-content .num li span {
            padding-left: 5px;
            font-weight: bold;
        }
    </style>
</head>
<body>
<!--头部-->
<%@include file="../include/header.jsp" %>
<div class="index-outside">
    <%@include file="../include/sidebar.jsp" %>
    <!--内容-->
    <section>
        <div class="section-main">
            <form class="layui-form" action="${ctx}/copartner/analyze/list.do" id="myForm" method="post">
                <input type="hidden" name="pageNo" id="pageNo"/>
                <div class="f-search-bar">
                    <div class="search-container">
                        <ul class="search-form-content">
                            <li class="form-item-inline"><label class="search-form-lable">昵称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="name" autocomplete="off" class="layui-input" value="${analyzeQuery.name}" placeholder="昵称">
                                </div>
                            </li>
                            <li class="form-item-inline"><label class="search-form-lable">手机</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="mobile" autocomplete="off" class="layui-input" value="${analyzeQuery.mobile}" placeholder="手机">
                                </div>
                            </li>
                            <li class="form-item-inline">
                                <div class="sub-btns">
                                    <a class="layui-btn layui-btn-danger" href="javascript:submitFunction('#myForm')">查询</a>
                                    <a class="layui-btn layui-btn-normal" href="javascript:resetFunction('#myForm')">重置</a>
                                </div>
                            </li>
                        </ul>
                        <ul class="search-form-content">
                            <li class="form-item">
                                <label class="search-form-lable">时间</label>
                                <div class="check-btn-inner">
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),'','#myForm')" ${empty analyzeQuery.timeType ? 'class="active"' : ''}>全部</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),1,'#myForm')" ${analyzeQuery.timeType == 1 ? 'class="active"' : ''}>今日</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),2,'#myForm')" ${analyzeQuery.timeType == 2 ? 'class="active"' : ''}>昨日</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),3,'#myForm')" ${analyzeQuery.timeType == 3 ? 'class="active"' : ''}>本周</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),4,'#myForm')" ${analyzeQuery.timeType == 4 ? 'class="active"' : ''}>本月</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),5,'#myForm')" ${analyzeQuery.timeType == 5 ? 'class="active"' : ''}>历史</a>
                                    <input type="hidden" name="timeType" value="${analyzeQuery.timeType}"/>
                                </div>
                                <div class="cl"></div>
                            </li>
                            <li class="form-item">
                                <label class="search-form-lable">排序</label>
                                <div class="check-btn-inner">
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),1,'#myForm')" ${empty analyzeQuery.sort || analyzeQuery.sort == 1 ? 'class="active"' : ''}>报名</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),2,'#myForm')" ${analyzeQuery.sort == 2 ? 'class="active"' : ''}>订单</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),3,'#myForm')" ${analyzeQuery.sort == 3 ? 'class="active"' : ''}>众筹成功</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),4,'#myForm')" ${analyzeQuery.sort == 4 ? 'class="active"' : ''}>累计资金</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),5,'#myForm')" ${analyzeQuery.sort == 5 ? 'class="active"' : ''}>累计佣金</a>
                                    <input type="hidden" name="sort" value="${analyzeQuery.sort}"/>
                                </div>
                                <div class="cl"></div>
                            </li>
                        </ul>
                    </div>
                </div>
            </form>
            <div class="list-content">
                <ul class="num">
                    <div class="l">
                        <li class="f16">累计佣金<span class="red"><fmt:formatNumber pattern="0.00" value="${resultMap.brokerageTotal}"/></span>元</li>
                        <li class="f16">累计推广资金<span class="red"><fmt:formatNumber pattern="0.00" value="${resultMap.totalMoney}"/></span>元</li>
                        <li class="f16">未结算佣金<span class="red"><fmt:formatNumber pattern="0.00" value="${resultMap.remainBrokerageTotal}"/></span>元</li>
                        <li class="f16">累计提现<span class="red"><fmt:formatNumber pattern="0.00" value="${resultMap.withdrawalTotal}"/></span>元</li>
                        <li class="f16">可提现佣金<span class="red"><fmt:formatNumber pattern="0.00" value="${resultMap.canWithdrawalTotal}"/></span>元</li>
                    </div>
                    <p class="cl"></p>
                </ul>
                <div class="cl">
                    <table class="layui-table">
                        <colgroup>
                            <col width="150">
                            <col width="120">
                            <col width="150">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                            <col width="100">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>昵称</th>
                            <th>手机</th>
                            <th>注册时间</th>
                            <th>报名</th>
                            <th>订单</th>
                            <th>众筹成功</th>
                            <th>累计资金(元)</th>
                            <th>累计佣金(元)</th>
                            <th>未结算佣金</th>
                            <th>可提现佣金</th>
                            <th>邀请合伙人</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach var="analyze" items="${list}">
                            <tr>
                                <td class="table-member" title="${analyze.name}"
                                    onclick="openDialogShow('用户名片','${ctx}/system/member/memberView.do?id=${analyze.memberId}','400px','470px')">
                                    <div class="member-cell">
                                        <div class="member-logo common-img" >
                                            <img src="<c:if test="${not empty analyze.logo}">${analyze.logo}?imageMogr2/auto-orient/crop/126x126</c:if>" alt="" onerror="txz.errImg(this)" onload="txz.imgLoad(this)">

                                        </div>
                                        <div class="member-name ellipsis-1">${analyze.name}</div>
                                    </div>
                                </td>
                                <td>${analyze.mobile}</td>
                                <td><fmt:formatDate value="${analyze.registerDate}" pattern="yyyy-MM-dd HH:mm"/></td>
                                <td>${analyze.applyNum}</td>
                                <td>${analyze.orderNum}</td>
                                <td>${analyze.successNum}</td>
                                <td><fmt:formatNumber pattern="0.00" value="${analyze.totalMoney}"/></td>
                                <td><fmt:formatNumber pattern="0.00" value="${analyze.totalBrokerage}"/></td>
                                <td class="red"><fmt:formatNumber pattern="0.00" value="${analyze.notBalance}"/></td>
                                <td class="red"><fmt:formatNumber pattern="0.00" value="${analyze.canWithdrawal}"/></td>
                                <td>
                                    <c:if test="${analyze.lowerNum > 0}">
                                        <a class="green" style="text-decoration: underline;" href="${ctx}/copartner/analyze/copartnerList.do?parentId=${analyze.memberId}&name=${analyze.name}" title="点击查看下级合伙人列表">
                                                ${empty analyze.lowerNum?0:analyze.lowerNum}
                                        </a>
                                    </c:if>
                                    <c:if test="${empty analyze.lowerNum || analyze.lowerNum == 0}">
                                        <a class="green" href="javascript:void(0)">0</a>
                                    </c:if>
                                </td>
                                <td class="tb-opts">
                                    <div class="comm-opts">
                                        <a href="${ctx}/copartner/analyze/crowdfundDistributeList.do?parentId=${analyze.memberId}" target="_self">
                                            详情
                                        </a>
                                    </div>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
            <div id="page_content" class="page-container"></div>
        </div><!--底部-->
        <%@include file="../include/footer.jsp" %>
    </section>
</div>

<script type="text/javascript" src="${ctx}/script/common/list.js"></script>
<script type="text/javascript" src="${ctx}/script/common/table_option.js"></script>
<script type="text/javascript">
    $(function () {
        //加载分页
        loadPageNew({
            elem: 'page_content',
            totalCount: '${page.totalCount}',
            limit: '${page.limit}',
            page: '${page.page}'
        });
    })
</script>
<script type="text/javascript">
    txz.initHeader({
        nav:[{
            name: '合伙人众筹数据',
            curr: true
        }],
        info:'<span class="f12">共<b id="totalCount">${page.totalCount}</b>条记录</span>'
    });
</script>
</body>
</html>